package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 小表开关阀日志对象 t_xb_command_logs
 *
 * @author gdqt
 * @date 2024-03-13
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_xb_command_logs")
public class XbCommandLogs extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 设备归属水司
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 集中器操作的表编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    @TableField("location_nb")
    private String locationNb;
    /**
     * 命令内容(0为关阀,1为开阀)
     */
    @Excel(name = "命令内容", dictType = "valve_command")
    @TableField("command")
    private Integer command;

    /**
     * 发送反馈
     */
    @Excel(name = "发送反馈")
    @TableField("feedback")
    private String feedback;

    /**
     * 发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("send_time")
    private Date sendTime;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @TableField("remark")
    private String remark;

    @TableField(exist = false)
    private String sheetsCode;
    @TableField(exist = false)
    private Long sysUserId;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("tenantId", getTenantId())
                .append("command", getCommand())
                .append("sendTime", getSendTime())
                .append("terminalId", getTerminalId())
                .append("feedback", getFeedback())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .toString();
    }
}
